let telInput = document.getElementById('tel_input');
let telWarnText = document.getElementById('tel_warn_text');
telInput.onfocus = function () {
    telWarnText.style.display = 'inline-block';
};
let decorator = function (inputId, type, fn) {
    let input = document.getElementById(inputId);
    let onType = 'on' + type;
    if (typeof input[onType] === 'function') {
        let oldTypeFn = input[onType];
        input[onType] = function () {
            oldTypeFn();
            fn();
        }
    } else {
        input[onType] = fn;
    }
};
decorator('tel_input', 'focus', function () {
    document.getElementById('tel_demo_text').style.display = 'none';
});
decorator('tel_input', 'blur', function () {
    document.getElementById('tel_demo_text').style.display = 'block';
});
